﻿cmake_minimum_required (VERSION 3.5.1)

project (SimpleService
	VERSION ${RTM_VERSION}
	LANGUAGES CXX)

set(${PROJECT_NAME}_IDLS MyService.idl)

openrtm_idl_compile_all(MyService
	"${${PROJECT_NAME}_IDLS}"
	"-I${CMAKE_CURRENT_SOURCE_DIR};-I${CMAKE_SOURCE_DIR}/src/lib/rtm/idl"
	MyService "")

examples_build(MyServiceConsumer
	SRCS MyServiceConsumer.cpp
	GENSRCS ${MyService_IDLSTUB}
	MAIN MyServiceConsumerComp.cpp
	EXTERNAL_INCLUDE PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
	DEPS MyService_IDLTGT)

examples_build(MyServiceProvider
	SRCS MyServiceProvider.cpp MyServiceSVC_impl.cpp
	GENSRCS ${MyService_IDLSKEL}
	MAIN MyServiceProviderComp.cpp
	EXTERNAL_INCLUDE PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
	DEPS MyService_IDLTGT)
